import { Context } from "koa";
import path from "path";
import  template from 'art-template' 

 const artRender = (ctx:Context, file:string, data:any) => {
  const html = template(path.join(__dirname, '../views', file), {
    ...ctx.state,
    ...data
  });
  ctx.body = html;
};
export default artRender